import type { FireCustomAttributes } from "@lib/types";
import type { JSX } from "solid-js/jsx-runtime";
import type { FormControlSize, FcValue } from "../types";
import type { JSXElement } from "solid-js";
import type { ValueAccessor } from "solid-form-context";

export type SelectOption = any;

export interface FcSelectProps extends
    Omit<JSX.SelectHTMLAttributes<HTMLSelectElement>, 'value' | 'classList'>,
    FireCustomAttributes<HTMLSelectElement>,
    ValueAccessor<FcValue | FcValue[]> {
    controlSize?: FormControlSize
    options?: SelectOption[]
    optionToValue?: string | ((option?: SelectOption) => FcValue)
    optionToLabel?: string | ((option?: SelectOption) => JSXElement)
}
